<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('')" />

    <style type="text/css">
        *{padding:0;margin: 0;}
        h1{font-size: 20px;}
        h3{font-size: 16px;}
        .left{
            float: left;
        }
        .right{
            float:right;
        }
        .clearfix{
            clear: both;
        }
        ul{list-style: none;}
        .print_container{
            padding: 20px;
            width: 250px;
        }
        .section1{
        }
        .section2 label{
            display: block;
        }
        .section3 label{
            display: block;
        }
        .section4{

        }
        .section4 .total label{
            display: block;
        }
        .section4 .other_fee{
            border-bottom: 1px solid #DADADA;
        }
        .section5 label{
            display: block;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="main-content">
        <form id="form-add" name="myForm" class="form-horizontal" th:object="${goodsOrder}">
            <div class="print_container">
                <h1 style="text-align: center"><span style="font-weight: bold;" th:text="${dept.deptName}"></span> </h1>
                <!--<div class="section1">
                    <h3>唛啦服饰购</h3>
                    <h3>购物清单</h3>
                </div>-->
                <span>*****************************************</span><!---->
                <div class="section2">
                    <label>订单编号：<span th:text="${goodsOrder.orderNo}"></span></label>
                </div>
                <span></span>
                <div class="section3">
                    <label>下单时间：<span th:text="${#dates.format(goodsOrder.orderTime,'yyyy-MM-dd HH:mm:ss')}"></span></label>
                </div>
                <span>*****************************************</span>
                <div class="section4">
                    <div style="border-bottom: 1px solid #DADADA;">
                        <table style="width: 100%;margin-bottom: 5px">
                            <thead>
                            <tr>
                                <td width="45%">名称</td>
                                <td width="15%">数量</td>
                                <td width="20%">单价</td>
                                <td width="20%">金额</td>
                            </tr>
                            </thead>
                            <tbody id="tbody">
                                <tr  th:each="h,stat : ${listOrderHead}">
                                    <td>
                                        <div th:text="${h.goodsName}"></div>
                                        <div th:text="${h.styleNumber}"></div>
                                    </td>
                                    <td th:text="${h.quantity}"></td>
                                    <td th:text="${h.preferentialPrice}"></td>
                                    <td th:text="${h.money}"></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!--<div class="total" style="margin-top: 10px">
                        <label class="left">实收：</label>
                        <label class="right" th:text="${goodsOrder.orderMoney}"></label>
                        <div class="clearfix">

                        </div>
                    </div>-->

                    <!--<span>**************************</span>-->
                </div>
                <div class="section5" style="margin-top: 15px">
                    <!--<label>原&nbsp;&nbsp;&nbsp;价：999</label>-->
                    <label>实收：<span th:text="${goodsOrder.orderMoney}"></span></label>
                </div>

                <span>*****************************************</span>
                <div class="section5" style="margin-top: 15px">
                    <!--<label>原&nbsp;&nbsp;&nbsp;价：999</label>-->
                    <label>谢谢惠顾！</label>
                    <label>欢迎下次光临</label>
                    <label>地址：<span th:text="${deptAddress}"></span></label>
                </div>
            </div>
        </form>
    </div>

    <script language="JavaScript">
        //window.close();
        window.onload=function(){
             setTimeout(function (){
                //window.external.printTicket("111111");
                 window.print();
            },1000)
        }
    </script>

</body>
</html>